import service from "@/utils/request"

import LoginWork from "@/utils/LoginWork"

// 指令包材订购查询
export const ToBeInstructed = (parms:any) => {
    return service.post<any,any>(`/PackagOtherOrderingOperation/getNotOrderMaterialList`,parms)
}

// 勾选待订购
export const CheckTheTapeOrderJob = (parms:any) => {
    return LoginWork.post<any,any>(`/PackagOtherOrderingOperation/makePurchaseOrder`,parms)
}

// 已订购明细查询
export const OrderedDetails = (parms:any) => {
    return service.post<any,any>(`/PackagOtherOrderingOperation/getOrderedDetailsList`,parms)
}

// 订购单取消
export const PurchaseOrderCancellation = (parms:any) => {
    return LoginWork.post<any,any>(`/PackagOtherOrderingOperation/cancelOrderedDetails?slipNo=${parms}`,)
}

// 生成订购单
export const PurchaseOrderCancellationList = (parms:any) => {
    return LoginWork.post<any,any>(`/PackagOtherOrderingOperation/makePurchaseOrder`,parms)
}

// 新增订购明细
export const NewOrderDetails = (parms:any) => {
    return service.post<any,any>(`/BrandMaterialDefinition/getBrandMaterialList`,parms)
}

// 材料分类查询
export const MaterialClassificationQuery = () => {
    return service.post<any,any>(`/back/getMaterialType?typeNo=${''}`)
}

// 生成物料编码
export const GeneratedMaterialCoding = (parms:any) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/makeSdMaterial`,parms)
}

// 增加
export const AddGeneratedMaterialCoding = (parms:any) => {
    return LoginWork.post<any,any>(`/BrandMaterialDefinition/addSdMaterial`,parms)
}

// 双击料号新增
export const dbClickAdd = (parms:any) => {
    return LoginWork.post<any,any>(`/PackagOtherOrderingOperation/selectMaterial`,parms)
}

// 指令查询
export const lotNoListQuery = (parms:any) => {
    return service.post<any,any>(`/InstructionPackagingMaterial/getLotNoList`,parms)
}

// 型体查询
export const styleQyert = (lotNo:string) => {
    return service.get<any,any>(`/back/getLotNoAndStyle?lotNo=${lotNo}`)
}

// 删除输入待定购明细
export const deleteList = (id:any) => {
    return LoginWork.post<any,any>(`/PackagOtherOrderingOperation/deleteNotOrderMaterial`,id)
}